#ADD_DEFINITIONS(-DOSGDB_LIBRARY)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
#set(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(APP_NAME netLib)

add_compile_definitions(NET_LIBRARY)
aux_source_directory(. SRC_DIR)

file(GLOB_RECURSE FIND_RET *.h)
#file(GLOB EXTERN_FILE ../include/comLib/*.h)

find_package(Libevent)
message(STATUS "${LIBEVENT_LIBRARY}")

add_library(${APP_NAME} SHARED
            ${FIND_RET}
            ${EXTERN_FILE}
            ${SRC_DIR}
        )

#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Lib)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Lib)
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Bin)

#SET(EXECUTABLE_OUTPUT_PATH ../../bin)
SET(LIBRARY_OUTPUT_PATH ${OUTPUT_PATH})
#/SAFESEH:NO
target_link_libraries(${APP_NAME} ${LIBEVENT_LIBRARY})